$OpenBSD: patch-configure,v 1.15 2014/11/29 10:10:47 jsg Exp $
--- configure.orig	Fri Jul 11 23:10:26 2014
+++ configure	Fri Nov 28 21:51:37 2014
@@ -1814,22 +1814,6 @@ if test "$_use_cxx11" = "yes" ; then
 fi
 echo $_use_cxx11
 
-# By default, we add -pedantic to the CXXFLAGS to catch some potentially
-# non-portable constructs, like use of GNU extensions.
-# However, some platforms use GNU extensions in system header files, so
-# for these we must not use -pedantic.
-case $_host_os in
-android | gamecube | psp | tizen | wii | webos)
-	;;
-*)
-	# ICC does not support pedantic, while GCC and clang do.
-	if test "$have_icc" = no ; then
-		# We *do* want the 'long long' extension.
-		CXXFLAGS="$CXXFLAGS -pedantic -Wno-long-long"
-	fi
-	;;
-esac
-
 # If possible, we want to use -Wglobal-constructors
 # However, not all compilers support that, so check whether the active one does.
 echocheck "whether -Wglobal-constructors work"
@@ -2003,7 +1987,7 @@ cc_check_clean tmp_find_type_with_size.cpp
 # for the smaller sizes.
 echo_n "Alignment required... "
 case $_host_cpu in
-	i[3-6]86 | amd64 | x86_64 | ppc*)
+	i[3-6]86 | amd64 | x86_64 | powerpc* | ppc*)
 		# Unaligned access should work
 		_need_memalign=no
 		;;
@@ -2046,7 +2030,7 @@ case $_host_cpu in
 		echo "MIPS"
 		DEFINES="$DEFINES -DMIPS_TARGET"
 		;;
-	ppc*)
+	powerpc* | ppc*)
 		echo "PowerPC"
 		DEFINES="$DEFINES -DPPC_TARGET"
 		;;
@@ -3460,18 +3444,16 @@ if test "$_flac" = auto ; then
 int main(void) { return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */ }
 EOF
 	if test "$_vorbis" = yes ; then
-		cc_check $FLAC_CFLAGS $FLAC_LIBS $OGG_CFLAGS $OGG_LIBS \
-			-lFLAC -logg && _flac=yes
+		cc_check `pkg-config --cflags --libs flac ogg` && _flac=yes
 	else
-		cc_check $FLAC_CFLAGS $FLAC_LIBS \
-			-lFLAC && _flac=yes
+		cc_check `pkg-config --cflags --libs flac` && _flac=yes
 	fi
 fi
 if test "$_flac" = yes ; then
 	if test "$_vorbis" = yes ; then
-		LIBS="$LIBS $FLAC_LIBS $OGG_LIBS -lFLAC -logg"
+		LIBS="$LIBS `pkg-config --libs flac ogg`"
 	else
-		LIBS="$LIBS $FLAC_LIBS -lFLAC"
+		LIBS="$LIBS `pkg-config --libs flac`"
 	fi
 	INCLUDES="$INCLUDES $FLAC_CFLAGS"
 fi
